using System.Diagnostics;
using mshtml;
using OFX.Aggregator.WebScraping.Infrastructure;

namespace OFX.Aggregator.WebScraping.Implementation
{
	internal class HtmlFrameWindowWrapper : IHtmlFrameWindow
	{
		private readonly HtmlDocumentManager documentManager;
		private readonly HTMLWindow2Class frame;

		[DebuggerStepThrough]
		public HtmlFrameWindowWrapper(HTMLWindow2Class frame, HtmlDocumentManager documentManager)
		{
			this.frame = frame;
			this.documentManager = documentManager;
		}

		#region Implementation of IHtmlFrameElement

		public IHtmlDocument Document
		{
			[DebuggerStepThrough]
			get { return this.documentManager.GetWrapper(this.frame.document); }
		}

		#endregion
	}
}